package com.ktgj.service.service.impl;

import java.util.List;
import com.ktgj.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.service.mapper.OrderPaymentRecordMapper;
import com.ktgj.service.domain.OrderPaymentRecord;
import com.ktgj.service.service.IOrderPaymentRecordService;

/**
 * 订单线上支付信息
Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-09-03
 */
@Service
public class OrderPaymentRecordServiceImpl implements IOrderPaymentRecordService 
{
    @Autowired
    private OrderPaymentRecordMapper orderPaymentRecordMapper;

    /**
     * 查询订单线上支付信息

     * 
     * @param paymentrecordsId 订单线上支付信息
ID
     * @return 订单线上支付信息

     */
    @Override
    public OrderPaymentRecord selectOrderPaymentRecordById(Long paymentrecordsId)
    {
        return orderPaymentRecordMapper.selectOrderPaymentRecordById(paymentrecordsId);
    }

    /**
     * 查询订单线上支付信息
列表
     * 
     * @param orderPaymentRecord 订单线上支付信息

     * @return 订单线上支付信息

     */
    @Override
    public List<OrderPaymentRecord> selectOrderPaymentRecordList(OrderPaymentRecord orderPaymentRecord)
    {
        return orderPaymentRecordMapper.selectOrderPaymentRecordList(orderPaymentRecord);
    }

    /**
     * 新增订单线上支付信息

     * 
     * @param orderPaymentRecord 订单线上支付信息

     * @return 结果
     */
    @Override
    public int insertOrderPaymentRecord(OrderPaymentRecord orderPaymentRecord)
    {
        return orderPaymentRecordMapper.insertOrderPaymentRecord(orderPaymentRecord);
    }

    /**
     * 修改订单线上支付信息

     * 
     * @param orderPaymentRecord 订单线上支付信息

     * @return 结果
     */
    @Override
    public int updateOrderPaymentRecord(OrderPaymentRecord orderPaymentRecord)
    {
        orderPaymentRecord.setUpdateTime(DateUtils.getNowDate());
        return orderPaymentRecordMapper.updateOrderPaymentRecord(orderPaymentRecord);
    }

    /**
     * 批量删除订单线上支付信息

     * 
     * @param paymentrecordsIds 需要删除的订单线上支付信息
ID
     * @return 结果
     */
    @Override
    public int deleteOrderPaymentRecordByIds(Long[] paymentrecordsIds)
    {
        return orderPaymentRecordMapper.deleteOrderPaymentRecordByIds(paymentrecordsIds);
    }

    /**
     * 删除订单线上支付信息
信息
     * 
     * @param paymentrecordsId 订单线上支付信息
ID
     * @return 结果
     */
    @Override
    public int deleteOrderPaymentRecordById(Long paymentrecordsId)
    {
        return orderPaymentRecordMapper.deleteOrderPaymentRecordById(paymentrecordsId);
    }
}
